package com.xxxx.rpc;


import com.xxxx.api.service.UserService;
import com.xxxx.rpc.service.SearchService;
import org.apache.dubbo.config.annotation.Reference;
import org.springframework.boot.CommandLineRunner;
import org.springframework.stereotype.Component;

import javax.annotation.Resource;

/**
 * @author zhoubin
 * @since 1.0.0
 */
@Component
public class SearchTest implements CommandLineRunner {

    @Resource
    private SearchService service;

    @Override
    public void run(String... args) throws Exception {
        service.doSearch("手机",1,10).forEach(System.out::println);
    }

    public SearchService get(){
        return service;
    }
}